import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    searchContent: '',
    searchLoading: false
  },
  mutations: {
    setSearchContent (state, content) {
      if (content !== null && content !== 'undefined') {
        state.searchContent = content
      }
    },
    setSearchLoading (state, flag) {
      state.searchLoading = flag
    }
  },
  actions: {

  }
})
